﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _12_Console
{
    /// <summary>
    /// 动物类：封装了所有动物公共的行为与特征
    /// </summary>
    internal abstract class Animal // 父类
    {
        public string Name { get; set; }
        public int Age { get; set; }
        public string Color { get; set; }
        public void Roar()
        {
            Console.WriteLine("叫!!!!!");
        }
        public Animal()
        {
            
        }
        public Animal(string name,int age,string color)
        {
            this.Name = name;
            this.Age = age;
            this.Color = color;
        }
        public void Print()
        {
            Console.WriteLine($"名字：{this.Name}，年龄：{this.Age}，颜色：{this.Color}");
        }
    }
}
